﻿
using UnityEngine;

namespace Framework.FSM
{
    /// <summary>
    /// 状态机状态数据
    /// </summary>
    public class FsmStateDataBase
    {
        public uint vShipID;
        public uint vlinkingTargetID = 0; // 

        public uint vlinkingTargetIndex = 0; //
        public int type;
        public uint index;    //index
        public float length;
        public GameObject virtualObj;
        #region 动画部分
        public GameObject m_Obj;
        public int m_CurrentIndex = 0;
        public bool m_isPartEnding = false;
        #endregion

        public uint vPreShipID;
        public uint vLastShipID;

        public void Copy(FsmStateDataBase fsdb)
        {
            vShipID = fsdb.vShipID;
            vlinkingTargetID = fsdb.vlinkingTargetID; // 
            vlinkingTargetIndex = fsdb.vlinkingTargetIndex; //
            type = fsdb.type;
            index = fsdb.index;    //index
            length = fsdb.length;
            virtualObj = GameObject.Instantiate(fsdb.virtualObj) as GameObject;
            #region 动画部分
            m_CurrentIndex = fsdb.m_CurrentIndex;
            m_isPartEnding = fsdb.m_isPartEnding;
            m_Obj = fsdb.m_Obj;
            #endregion

            vPreShipID = fsdb.vPreShipID;
            vLastShipID = fsdb.vLastShipID;
        }
    }
}
